package com.guigu.service.impl;

import com.guigu.dto.mealsDTO;
import com.guigu.entity.meals;
import com.guigu.mapper.mealsMapper;
import com.guigu.service.mealsService;
import com.guigu.vo.mealsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class mealsServicelmpl implements mealsService {
    @Autowired
    private mealsMapper memapper;

    @Override
    public List<mealsVO> query(mealsDTO dto) {
        return this.memapper.query(dto);
    }

    @Override
    public Integer maxid() {
        return this.memapper.maxid();
    }

    @Override
    public int add(meals ms) {
        return this.memapper.add(ms);
    }

    @Override
    public int update(meals ms) {
        return this.memapper.update(ms);
    }

    @Override
    public int delete(int id) {
        return this.memapper.delete(id);
    }
}
